<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Vuex 是什么？ | Vuex</title>
    <meta name="description" content="Vue.js 的中心化状态管理方案">
    <link rel="stylesheet" href="static/css/style.34a39eef.css">
    <link rel="modulepreload" href="https://vuex.vuejs.org/assets/Home.8c77385a.js">
    <link rel="modulepreload" href="https://vuex.vuejs.org/assets/vuex.7a49333f.js">
    <link rel="modulepreload" href="https://vuex.vuejs.org/assets/app.a0c675ce.js">
    <link rel="modulepreload" href="https://vuex.vuejs.org/assets/zh_index.md.a3d6a61d.lean.js">
    <link rel="modulepreload" href="https://vuex.vuejs.org/assets/app.a0c675ce.js">
    <link rel="icon" href="https://vuex.vuejs.org/logo.png">
    <link rel="apple-touch-icon" href="https://vuex.vuejs.org/icons/apple-touch-icon-152x152.png">
    <link rel="mask-icon" href="https://vuex.vuejs.org/icons/safari-pinned-tab.svg" color="#3eaf7c">
    <meta name="msapplication-TileImage" content="/icons/msapplication-icon-144x144.png">
    <meta name="twitter:title" content="Vuex 是什么？ | Vuex">
    <meta property="og:title" content="Vuex 是什么？ | Vuex">
  </head>
  <body>
    <div id="app"><!--[--><div class="theme"><header class="nav-bar" data-v-675d8756=""><div class="sidebar-button" data-v-675d8756=""><svg class="icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewbox="0 0 448 512"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z" class=""></path></svg></div><a class="nav-bar-title" href="javascript:;" aria-label="Vuex, back to home" data-v-675d8756="" data-v-4a583abe=""><!----> Vuex</a><div class="flex-grow" data-v-675d8756=""></div><div class="nav" data-v-675d8756=""><nav class="nav-links" data-v-675d8756="" data-v-eab3edfe=""><!--[--><div class="item" data-v-eab3edfe=""><div class="nav-link" data-v-eab3edfe="" data-v-b8818f8c=""><a class="item" href="javascript:;" data-v-b8818f8c="">指南 <!----></a></div></div><div class="item" data-v-eab3edfe=""><div class="nav-link" data-v-eab3edfe="" data-v-b8818f8c=""><a class="item" href="javascript:;" data-v-b8818f8c="">API 参考 <!----></a></div></div><div class="item" data-v-eab3edfe=""><div class="nav-link" data-v-eab3edfe="" data-v-b8818f8c=""><a class="item isExternal" href="javascript:;" target="_blank" rel="noopener noreferrer" data-v-b8818f8c="">更新记录 <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c=""><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-eab3edfe=""><div class="nav-dropdown-link" data-v-eab3edfe="" data-v-56bf3a3f=""><button class="button" data-v-56bf3a3f=""><span class="button-text" data-v-56bf3a3f="">v4.x</span><span class="right button-arrow" data-v-56bf3a3f=""></span></button><ul class="dialog" data-v-56bf3a3f=""><!--[--><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item isExternal" href="javascript:;" target="_blank" rel="noopener noreferrer" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">v3.x</span><span class="icon" data-v-bbc27490=""><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-bbc27490=""><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></span></a></div></li><!--]--></ul></div></div><!--]--><div class="item" data-v-eab3edfe=""><div class="nav-dropdown-link" data-v-eab3edfe="" data-v-56bf3a3f=""><button class="button" data-v-56bf3a3f=""><span class="button-text" data-v-56bf3a3f="">选择语言</span><span class="right button-arrow" data-v-56bf3a3f=""></span></button><ul class="dialog" data-v-56bf3a3f=""><!--[--><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item" href="index5.html" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">English</span><span class="icon" data-v-bbc27490=""><!----></span></a></div></li><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item active" href="" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">简体中文</span><span class="icon" data-v-bbc27490=""><!----></span></a></div></li><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item" href="index20.html" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">日本語</span><span class="icon" data-v-bbc27490=""><!----></span></a></div></li><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item" href="index21.html" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">Português</span><span class="icon" data-v-bbc27490=""><!----></span></a></div></li><!--]--></ul></div></div><div class="item" data-v-eab3edfe=""><div class="nav-link" data-v-eab3edfe="" data-v-b8818f8c=""><a class="item isExternal" href="javascript:;" target="_blank" rel="noopener noreferrer" data-v-b8818f8c="">GitHub <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c=""><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div></nav></div><!--[--><!--]--></header><aside class="sidebar" data-v-83e92a68=""><nav class="nav-links nav" data-v-83e92a68="" data-v-eab3edfe=""><!--[--><div class="item" data-v-eab3edfe=""><div class="nav-link" data-v-eab3edfe="" data-v-b8818f8c=""><a class="item" href="javascript:;" data-v-b8818f8c="">指南 <!----></a></div></div><div class="item" data-v-eab3edfe=""><div class="nav-link" data-v-eab3edfe="" data-v-b8818f8c=""><a class="item" href="javascript:;" data-v-b8818f8c="">API 参考 <!----></a></div></div><div class="item" data-v-eab3edfe=""><div class="nav-link" data-v-eab3edfe="" data-v-b8818f8c=""><a class="item isExternal" href="javascript:;" target="_blank" rel="noopener noreferrer" data-v-b8818f8c="">更新记录 <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c=""><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-eab3edfe=""><div class="nav-dropdown-link" data-v-eab3edfe="" data-v-56bf3a3f=""><button class="button" data-v-56bf3a3f=""><span class="button-text" data-v-56bf3a3f="">v4.x</span><span class="right button-arrow" data-v-56bf3a3f=""></span></button><ul class="dialog" data-v-56bf3a3f=""><!--[--><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item isExternal" href="javascript:;" target="_blank" rel="noopener noreferrer" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">v3.x</span><span class="icon" data-v-bbc27490=""><svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-bbc27490=""><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></span></a></div></li><!--]--></ul></div></div><!--]--><div class="item" data-v-eab3edfe=""><div class="nav-dropdown-link" data-v-eab3edfe="" data-v-56bf3a3f=""><button class="button" data-v-56bf3a3f=""><span class="button-text" data-v-56bf3a3f="">选择语言</span><span class="right button-arrow" data-v-56bf3a3f=""></span></button><ul class="dialog" data-v-56bf3a3f=""><!--[--><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item" href="index5.html" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">English</span><span class="icon" data-v-bbc27490=""><!----></span></a></div></li><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item active" href="" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">简体中文</span><span class="icon" data-v-bbc27490=""><!----></span></a></div></li><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item" href="index20.html" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">日本語</span><span class="icon" data-v-bbc27490=""><!----></span></a></div></li><li class="dialog-item" data-v-56bf3a3f=""><div class="nav-dropdown-link-item" data-v-56bf3a3f="" data-v-bbc27490=""><a class="item" href="index21.html" data-v-bbc27490=""><span class="arrow" data-v-bbc27490=""></span><span class="text" data-v-bbc27490="">Português</span><span class="icon" data-v-bbc27490=""><!----></span></a></div></li><!--]--></ul></div></div><div class="item" data-v-eab3edfe=""><div class="nav-link" data-v-eab3edfe="" data-v-b8818f8c=""><a class="item isExternal" href="javascript:;" target="_blank" rel="noopener noreferrer" data-v-b8818f8c="">GitHub <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-b8818f8c=""><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div></nav><!--[--><!--]--><ul class="sidebar-links" data-v-83e92a68=""><!--[--><li class="sidebar-link"><p class="sidebar-link-item">介绍</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item active" href="javascript:;">Vuex 是什么?</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#什么是“状态管理模式”？">什么是“状态管理模式”？</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#什么情况下我应该使用-vuex？">什么情况下我应该使用 Vuex？</a><!----></li></ul></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">安装</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">开始</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">核心概念</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">State</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">Getter</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">Mutation</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">Action</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">Module</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">进阶</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">项目结构</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">组合式 API</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">插件</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">严格模式</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">表单处理</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">测试</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">热重载</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">TypeScript 支持</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">迁移指南</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="javascript:;">从 3.x 迁移到 4.0</a><!----></li></ul></li><!--]--></ul><!--[--><!--]--></aside><!-- TODO: make this button accessible --><div class="sidebar-mask"></div><main class="page" data-v-7eddb2c4=""><div class="container" data-v-7eddb2c4=""><!--[--><!--]--><div style="position:relative;" class="content" data-v-7eddb2c4=""><div><h1 id="vuex-是什么？" tabindex="-1">Vuex 是什么？ <a class="header-anchor" href="#vuex-是什么？" aria-hidden="true">#</a></h1><div class="tip custom-block"><p class="custom-block-title">提示</p><p>这是与 Vue 3 匹配的 Vuex 4 的文档。如果您在找与 Vue 2 匹配的 Vuex 3 的文档，<a href="javascript:;" target="_blank" rel="noopener noreferrer">请在这里查看</a>。</p></div><p>Vuex 是一个专为 Vue.js 应用程序开发的<strong>状态管理模式 + 库</strong>。它采用集中式存储管理应用的所有组件的状态，并以相应的规则保证状态以一种可预测的方式发生变化。</p><h2 id="什么是“状态管理模式”？" tabindex="-1">什么是“状态管理模式”？ <a class="header-anchor" href="#什么是“状态管理模式”？" aria-hidden="true">#</a></h2><p>让我们从一个简单的 Vue 计数应用开始：</p><div class="language-js"><pre><code><span class="token keyword">const</span> Counter <span class="token operator">=</span> <span class="token punctuation">{</span>
  <span class="token comment">// 状态</span>
  <span class="token function">data</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token punctuation">{</span>
      count<span class="token operator">:</span> <span class="token number">0</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token comment">// 视图</span>
  template<span class="token operator">:</span> <span class="token template-string"><span class="token template-punctuation string">`</span><span class="token string">
    &lt;div&gt;{{ count }}&lt;/div&gt;
  </span><span class="token template-punctuation string">`</span></span><span class="token punctuation">,</span>
  <span class="token comment">// 操作</span>
  methods<span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token function">increment</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token keyword">this</span><span class="token punctuation">.</span>count<span class="token operator">++</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>

<span class="token function">createApp</span><span class="token punctuation">(</span>Counter<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">mount</span><span class="token punctuation">(</span><span class="token string">&#39;#app&#39;</span><span class="token punctuation">)</span>
</code></pre></div><p>这个状态自管理应用包含以下几个部分：</p><ul><li><strong>状态</strong>，驱动应用的数据源；</li><li><strong>视图</strong>，以声明方式将<strong>状态</strong>映射到视图；</li><li><strong>操作</strong>，响应在<strong>视图</strong>上的用户输入导致的状态变化。</li></ul><p>以下是一个表示“单向数据流”理念的简单示意：</p><p style="text-align:center;margin:2em;"><img style="width:100%;max-width:450px;" src="static/picture/flow.png"></p><p>但是，当我们的应用遇到<strong>多个组件共享状态</strong>时，单向数据流的简洁性很容易被破坏：</p><ul><li>多个视图依赖于同一状态。</li><li>来自不同视图的行为需要变更同一状态。</li></ul><p>对于问题一，传参的方法对于多层嵌套的组件将会非常繁琐，并且对于兄弟组件间的状态传递无能为力。对于问题二，我们经常会采用父子组件直接引用或者通过事件来变更和同步状态的多份拷贝。以上的这些模式非常脆弱，通常会导致无法维护的代码。</p><p>因此，我们为什么不把组件的共享状态抽取出来，以一个全局单例模式管理呢？在这种模式下，我们的组件树构成了一个巨大的“视图”，不管在树的哪个位置，任何组件都能获取状态或者触发行为！</p><p>通过定义和隔离状态管理中的各种概念并通过强制规则维持视图和状态间的独立性，我们的代码将会变得更结构化且易维护。</p><p>这就是 Vuex 背后的基本思想，借鉴了 <a href="javascript:;" target="_blank" rel="noopener noreferrer">Flux</a>、<a href="javascript:;" target="_blank" rel="noopener noreferrer">Redux</a> 和 <a href="javascript:;" target="_blank" rel="noopener noreferrer">The Elm Architecture</a>。与其他模式不同的是，Vuex 是专门为 Vue.js 设计的状态管理库，以利用 Vue.js 的细粒度数据响应机制来进行高效的状态更新。</p><p>如果你想交互式地学习 Vuex，可以看这个 <a href="javascript:;" target="_blank" rel="noopener noreferrer">Scrimba 上的 Vuex 课程</a>，它将录屏和代码试验场混合在了一起，你可以随时暂停并尝试。</p><p><img src="static/picture/vuex.png" alt="vuex"></p><h2 id="什么情况下我应该使用-vuex？" tabindex="-1">什么情况下我应该使用 Vuex？ <a class="header-anchor" href="#什么情况下我应该使用-vuex？" aria-hidden="true">#</a></h2><p>Vuex 可以帮助我们管理共享状态，并附带了更多的概念和框架。这需要对短期和长期效益进行权衡。</p><p>如果您不打算开发大型单页应用，使用 Vuex 可能是繁琐冗余的。确实是如此——如果您的应用够简单，您最好不要使用 Vuex。一个简单的 <a href="state-management.html#%E4%BB%8E%E9%9B%B6%E6%89%93%E9%80%A0%E7%AE%80%E5%8D%95%E7%8A%B6%E6%80%81%E7%AE%A1%E7%90%86" target="_blank" rel="noopener noreferrer">store 模式</a>就足够您所需了。但是，如果您需要构建一个中大型单页应用，您很可能会考虑如何更好地在组件外部管理状态，Vuex 将会成为自然而然的选择。引用 Redux 的作者 Dan Abramov 的话说就是：</p><blockquote><p>Flux 架构就像眼镜：您自会知道什么时候需要它。</p></blockquote></div></div><footer class="page-footer" data-v-7eddb2c4="" data-v-fb8d84c6=""><div class="edit" data-v-fb8d84c6=""><div class="edit-link" data-v-fb8d84c6="" data-v-1ed99556=""><a class="link" href="javascript:;" target="_blank" rel="noopener noreferrer" data-v-1ed99556="">在 GitHub 上编辑此页 <svg class="icon outbound icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-1ed99556=""><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="updated" data-v-fb8d84c6=""><p class="last-updated" data-v-fb8d84c6="" data-v-5797b537=""><span class="prefix" data-v-5797b537="">最近更新时间:</span><span class="datetime" data-v-5797b537=""></span></p></div></footer><div class="next-and-prev-link" data-v-7eddb2c4="" data-v-38ede35f=""><div class="container" data-v-38ede35f=""><div class="prev" data-v-38ede35f=""><!----></div><div class="next" data-v-38ede35f=""><a class="link" href="javascript:;" data-v-38ede35f=""><span class="text" data-v-38ede35f="">安装</span><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon icon-next" data-v-38ede35f=""><path d="M19.9,12.4c0.1-0.2,0.1-0.5,0-0.8c-0.1-0.1-0.1-0.2-0.2-0.3l-7-7c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l5.3,5.3H5c-0.6,0-1,0.4-1,1s0.4,1,1,1h11.6l-5.3,5.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l7-7C19.8,12.6,19.9,12.5,19.9,12.4z"></path></svg></a></div></div></div><!--[--><!--]--></div></main></div><!----><!--]--></div>
    <script>__VP_HASH_MAP__ = JSON.parse("{\"api_index.md\":\"4b45326e\",\"guide_actions.md\":\"9c977133\",\"guide_composition-api.md\":\"e01a428e\",\"guide_forms.md\":\"88f1ed54\",\"guide_getters.md\":\"2c5a0a0f\",\"guide_hot-reload.md\":\"c48e843e\",\"guide_index.md\":\"9dd21f7f\",\"guide_migrating-to-4-0-from-3-x.md\":\"66bd8cdf\",\"guide_modules.md\":\"95d32beb\",\"guide_mutations.md\":\"30cb1589\",\"guide_plugins.md\":\"a5e8be4d\",\"guide_state.md\":\"cfabbe36\",\"guide_strict.md\":\"9bdbc14d\",\"guide_structure.md\":\"0ac43d49\",\"guide_testing.md\":\"94c354a4\",\"guide_typescript-support.md\":\"946e4e74\",\"index.md\":\"7af08570\",\"installation.md\":\"71c4359e\",\"ja_api_index.md\":\"8ec02de7\",\"ja_guide_actions.md\":\"42d59860\",\"ja_guide_composition-api.md\":\"cf296415\",\"ja_guide_forms.md\":\"5c31ae2d\",\"ja_guide_getters.md\":\"a77b5c1e\",\"ja_guide_hot-reload.md\":\"4d14d06a\",\"ja_guide_index.md\":\"3a822b66\",\"ja_guide_migrating-to-4-0-from-3-x.md\":\"83fc993e\",\"ja_guide_modules.md\":\"bac522b8\",\"ja_guide_mutations.md\":\"9d14eba6\",\"ja_guide_plugins.md\":\"a729ddb7\",\"ja_guide_state.md\":\"6ac0e22d\",\"ja_guide_strict.md\":\"ca0af90e\",\"ja_guide_structure.md\":\"2ced329c\",\"ja_guide_testing.md\":\"246aa11b\",\"ja_guide_typescript-support.md\":\"95cb7cd9\",\"ja_index.md\":\"9e875040\",\"ja_installation.md\":\"f8883b0e\",\"ptbr_api_index.md\":\"c4a435dc\",\"ptbr_guide_actions.md\":\"4cd5afd8\",\"ptbr_guide_composition-api.md\":\"2de3cb0f\",\"ptbr_guide_forms.md\":\"d0a4a328\",\"ptbr_guide_getters.md\":\"0c62027a\",\"ptbr_guide_hot-reload.md\":\"edbb7f15\",\"ptbr_guide_index.md\":\"811fc38d\",\"ptbr_guide_migrating-to-4-0-from-3-x.md\":\"181af949\",\"ptbr_guide_modules.md\":\"035ca19f\",\"ptbr_guide_mutations.md\":\"a2194efe\",\"ptbr_guide_plugins.md\":\"ec68cab5\",\"ptbr_guide_state.md\":\"dbf6664a\",\"ptbr_guide_strict.md\":\"97901fcf\",\"ptbr_guide_structure.md\":\"493e0d23\",\"ptbr_guide_testing.md\":\"d9697706\",\"ptbr_guide_typescript-support.md\":\"d953d20b\",\"ptbr_index.md\":\"ce9751cf\",\"ptbr_installation.md\":\"fd9a58ca\",\"zh_api_index.md\":\"23227cff\",\"zh_guide_actions.md\":\"da25dd64\",\"zh_guide_composition-api.md\":\"9749c62a\",\"zh_guide_forms.md\":\"86e4b348\",\"zh_guide_getters.md\":\"d1f15af9\",\"zh_guide_hot-reload.md\":\"4832723a\",\"zh_guide_index.md\":\"6acb073d\",\"zh_guide_migrating-to-4-0-from-3-x.md\":\"9fad3617\",\"zh_guide_modules.md\":\"ce6036f0\",\"zh_guide_mutations.md\":\"2d3a9d53\",\"zh_guide_plugins.md\":\"8ab716ca\",\"zh_guide_state.md\":\"bacdc670\",\"zh_guide_strict.md\":\"99f28b75\",\"zh_guide_structure.md\":\"40f32e7f\",\"zh_guide_testing.md\":\"4d60bd56\",\"zh_guide_typescript-support.md\":\"a45beb7b\",\"zh_index.md\":\"a3d6a61d\",\"zh_installation.md\":\"14a19a2b\"}")</script>
    <script type="module" async="" src="static/js/app.a0c675ce.js"></script>
    
  </body>
</html>